package com.childguo;

import com.childguo.oc.Person;
import com.configuration.CommonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Import;

/**
 * First Demo
 *
 */
@SpringBootApplication
@Import(CommonConfig.class)
public class SpringBootCreateMavenApplication
{
    public static void main(String[] args)
    {

        ApplicationContext app = SpringApplication.run(SpringBootCreateMavenApplication.class, args);
        Person p = (Person)app.getBean("getPerson");
        System.out.println(p.getName());
        System.out.println(app.getBean("getStu"));
    }
}
